package com.csea.app.model.vo.user;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import lombok.Data;

// 新增密码修改请求对象
@Data
@Schema(description = "密码修改请求对象")
public class PasswordUpdateReqVO {
    @NotBlank(message = "原密码不能为空")
    @Schema(description = "原密码")
    private String oldPassword;

    @NotBlank(message = "新密码不能为空")
    @Pattern(regexp = "^(?=.*[A-Za-z])(?=.*\\d)[A-Za-z\\d]{8,}$",
            message = "密码需至少8位且包含字母和数字")
    @Schema(description = "新密码")
    private String newPassword;
}